package com.bytz.modules.cms.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bytz.modules.cms.order.entity.OrderPickUpDetail;

import java.util.List;

/**
 * <p>
 * 莱宝CMS—订单管理-订单交易提货明细表 服务类
 * </p>
 *
 * @author KyleWang
 * @since 2022-10-10
 */
public interface IOrderPickUpDetailService extends IService<OrderPickUpDetail> {

    /**
     * 根据订单id获取
     */
    List<OrderPickUpDetail> getByOrderId(String orderId);

    /**
     * 通过支付主数据Id获取
     */
    List<OrderPickUpDetail> getByOrderPayId(String orderPayId);

    /**
     * 直接提交尾款
     */
    void directSubmitBalancePay(List<OrderPickUpDetail> pickUpDetails, String orderPayId);

    /**
     * 保存提货明细
     */
    void savePickupDetails(List<OrderPickUpDetail> pickUpDetails, String orderPayId);

    /**
     * 提交尾款（回调提交）
     */
    void submitBalancePay(String orderPayId);

    /**
     * 尾款支付失败
     */
    void rollbackBalancePay(String orderPayId);
}
